function Animal(name,gender){
    this.name = name;
    this.gender = gender;
}
Animal.prototype.sayName = function(){
    console.log("my name is",this.name)
}
function Person(name,gender,age){
    //借用构造函数
    Animal.call(this,name,gender);
    //this.name = name;
    this.age = age;
}
//原型链继承
Person.prototype = new Animal();
Person.prototype.sayAge = function(){
    console.log("my age is",this.age);
}
var p = new Person("moyu","remale",23);
console.log(p);
p.sayName();
p.sayAge();
